import { instance } from '../utils/request'
// 获取新闻频道
const getArticles = ({ id }) => {
  return instance({
    url: '/v1_0/articles/' + id,
    method: 'get'
  })
}

const followUser = ({ target }) => {
  return instance({
    url: '/v1_0/user/followings',
    method: 'post',
    data: {
      target
    }
  })
}
const unFollowUser = ({ target }) => {
  return instance({
    url: '/v1_0/user/followings/' + target,
    method: 'delete'
  })
}
export { getArticles, followUser, unFollowUser }
